﻿<Window x:Class="ParseOnlineAdmin.HostWindow"
		xmlns:ParseControls="clr-namespace:ParseControls;assembly=ParseControls"  
		xmlns:ParseOnlineAdmin="clr-namespace:ParseOnlineAdmin"  
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:ParseOnlineAdmin" Background="#ff000000"
		WindowStartupLocation="CenterScreen" WindowState="Normal" WindowStyle="None"
		Loaded="Window_Loaded" Height="650" Width="1100" ShowInTaskbar="True">

	<Window.Resources>
		<local:IEnumerableVisibilityConverter x:Key="ivc" />
		<local:ObjectNullVisibilityConverter x:Key="onvc" />

		<!-- Shadow -->
		<DropShadowEffect x:Key="shadowDark" BlurRadius="5" 
					  ShadowDepth="3" Color="#555555" 
				Direction="270" RenderingBias="Performance" />
	</Window.Resources>
	
	<Window.DataContext>
		<local:ParseDataContext x:Name="ctx" />
	</Window.DataContext>
	
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="*" />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

        <!-- Source="Content/berlin.jpg" -->
		<Image x:Name="bgImage" Stretch="UniformToFill" 
			Grid.ColumnSpan="3" Grid.RowSpan="4"  />
		
		<!-- Apps Selector-->
		<Border x:Name="Apps" Grid.Column="0" Grid.Row="1"
				Background="#ff555555" Effect="{StaticResource shadowDark}">
			<ParseOnlineAdmin:ParseAppsView />
		</Border>

		<!-- Classes -->
		<Border x:Name="Classes" Grid.Column="0" Grid.Row="2" 
				Background="#ff555555" Effect="{StaticResource shadowDark}">
			<ParseOnlineAdmin:ParseClassesListView />
		</Border>

		<GridSplitter Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" 
					  Width="5" HorizontalAlignment="Left" Background="Transparent" />
		<Border Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1,0,0,0" >
			<Border.BorderBrush>
				<VisualBrush>
					<VisualBrush.Visual>
						<Rectangle Stroke="Gray" StrokeDashArray="4 2" StrokeThickness="1"
							Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
							Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
					</VisualBrush.Visual>
				</VisualBrush>
			</Border.BorderBrush>
		</Border>

		<!-- Items -->
		<Border x:Name="Items" Margin="10"
				Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" >
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>

				<ParseOnlineAdmin:ParseItemsListView  Grid.RowSpan="2" />

                <Border Grid.Row="1" Margin="15" CornerRadius="3"
                        Background="#ff333333" Padding="3"
                        Effect="{StaticResource shadowDark}">
                    <ParseOnlineAdmin:ParseToolBox />
                </Border>
				
			</Grid>
		</Border>

		<!-- Details -->
		<Border x:Name="Details" Margin="0,10,10,10"  Effect="{StaticResource shadowDark}"
				Visibility="{Binding Path=SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, 
					Converter={StaticResource onvc}}"
				Grid.Column="2" Grid.Row="1" Grid.RowSpan="2"
				Background="#ff555555">
			<ParseControls:FwScrollViewer>
				<StackPanel Width="250">

					<!-- Details -->
					<ParseOnlineAdmin:ParseItemDetails />
					
					<!-- Tasks -->
					<ParseControls:FwExpander Title="Aufgaben">
						<ParseOnlineAdmin:ParseRelatedTasks />
					</ParseControls:FwExpander>
					

					<!-- Properties -->
					<ParseControls:FwExpander Title="Eigenschaften">
						<ParseOnlineAdmin:ParseRelatedProperties />
					</ParseControls:FwExpander>
					
					
					<!-- Files -->
					<ParseControls:FwExpander Title="Dateien">
						<ParseOnlineAdmin:ParseRelatedFiles />
					</ParseControls:FwExpander>
					
					<!-- Related Items -->
					<ParseControls:FwExpander Title="Verbundene Daten">
						<ParseOnlineAdmin:ParseRelatedItems />
					</ParseControls:FwExpander>
					
					<!-- Comments -->
					<ParseControls:FwExpander Title="Kommentare">
						<ParseOnlineAdmin:ParseRelatedComments />
					</ParseControls:FwExpander>
					
				</StackPanel>
			</ParseControls:FwScrollViewer>
		</Border>

		<!-- Panel -->
		<Border x:Name="panel" Grid.Column="1" Grid.Row="1"  Grid.RowSpan="2"
				Margin="50,0,50,0" MaxHeight="250" VerticalAlignment="Top">
			
		</Border>
		
		<!-- Header -->
		<Border x:Name="Header" Grid.ColumnSpan="3" Grid.Row="0" 
				Background="#ff333333" Height="40" Effect="{StaticResource shadowDark}">
			<ParseOnlineAdmin:ParseHeaderView />
		</Border>
	</Grid>
</Window>
